package org.easyframework.bad.core;

import java.io.IOException;

public class CLExecutor {

	public static Process exec(final CLTask task) {
		Runtime rt = Runtime.getRuntime();

		try {
			return rt.exec(task.getCommand(), null, task.getWorkingDir());
		} catch (IOException e) {
			throw new BadExecutionException(e.getMessage());
		}
	}

}
